using UnityEngine;
using System.Collections;

public class CoinBehaviour : DrawableGameObject 
{
	public Texture2D[] coinAnimation;
	
	public override void Start () 
	{
		base.SetAnimations(null, coinAnimation, null, null, null);
		base.Start();
	}
	
	public void Update () 
	{
		RunAnimation();
	}
	
	public void RunAnimation()
	{
        base.RunAnimation("Run", "Loop");
	}
	
	void OnTriggerStay(Collider other)
    {
		if (other.gameObject.tag == "Player")
        {
            Destroy(gameObject);
        }
	}
}
